Generally, a debugger indicates an instrument that is used for a program development process. The debugger functions to execute a program, to examine and change a status of the program, and to set up a breakpoint. Through this, the debugger may easily retrieve a syntactic error or a semantic error included in the program. In particular, the semantic error of the program corresponds to a logical error caused by a developer for the program development process. The program may need to be tracked to find the semantic error.
The program tracking function indicates a function of checking intermediate results while executing the program based on a line or a command unit. The program tracking function may be one of the most important functions provided by the debugger. Specifically, the debugger may execute the program based on a line unit of a source code. In this case, the debugger enables a Central Processing Unit (CPU) of a computer to execute a single line and to wait for a next command of the developer.
A program debugging process using the debugger may include four operations, for example, an operation of recognizing an error of a program, an operation of detecting a location of the error, an operation of detecting a cause of the error, and an operation of correcting the error. For this, the debugger may provide basic functions such as a program execution function, a program tracking function, a breakpoint setup function, a parameter test function, a parameter change function, a current location report function, and the like
A compiler may generate debugging information to describe a source file to be debugged to the debugger, so that the debugger may perform a desired function. The debugging information generally may be divided into information associated with a structure of the program and information associated with an internal symbol of the program. Information associated with the structure of the program may include a source file, line information, a module name, a module range, a name and a path of the source file, block information, a procedure name and type, and the like. Information associated with the internal symbol of the program may include a symbol mode, information of each mode, a symbol address, and the like.
Remote software may be debugged using a GNU Source-Level Debugger (GDB) and a GDB server with respect to basic functions used for general source code debugging. The basic functions may include, for example, a program execution control function, a memory reference and change function, a register reference and change function, a breakpoint setup and release function, and the like.
The GDB may provide many functions of tracking an execution of a computer program to correct the computer program. A user may monitor or change values of internal parameters of the computer program, and may also call a function independently from a general program execution process.
Also, the GDB may support a remote mode used when debugging an embedded system. Remote debugging indicates that the GDB operates on a single machine and a program to be debugged operates on another machine. The GDB may communicate with a remote stub being aware of a GDB protocol, using a serial port or a Transmission Control Protocol/Internet Protocol (TCP/IP). A remote debugging mode may be used in a KGDB that is a source-level debugger used for a Linux kernel. When using the KGDB, a kernel developer may debug a kernel in a similar way as a general application program. The KGDB may insert a breakpoint into a kernel code, and may execute a code by each single step or observe a parameter value. A processor including a hardware debugging register may set up a watchpoint to thereby set up a breakpoint when a particular memory address is accessed or is executed. The KGDB may need another machine that may be connected, using a serial cable or Ethernet, to a machine to be debugged. FreeBSD may perform debugging using Firewire Direct Memory Access (DMA).
However, to perform remote debugging using the GDB and the GDB server, a host computer where the GDB operates may need to be in an environment where the GDB is operable. Accordingly, in an aspect that an environment setup for the host computer is required prior to performing debugging, it may be difficult to effectively perform debugging. In addition, a spatial constraint may occur in performing debugging. When the GDB debugs a target system, a Command Line Interface (CLI) may be generally provided as a user interface. The CLI may cause an inconvenience for unskilled users.